package com.feishi.core.analytic.parser;

import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by caixq on 5/4 004.
 */
public class PoStringParser implements PoParser<String> {
    private Charset charset= StandardCharsets.UTF_8;
    @Override
    public byte[] getBytes(String value) {
        return value.getBytes(charset);
    }

    @Override
    public String getValue(byte[] bytes) {
        return doFilter(new String(bytes,charset));
    }

    private List<Filter<String>> filters=new ArrayList();

    @Override
    public List<Filter<String>> getFilters() {
        return filters;
    }
}
